<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--<link rel="stylesheet" type="text/css" href="../public/css/styles.css" />-->
<link rel="stylesheet" type="text/css" href="../Public/css/styles.css" />
<title><?php echo ($title); ?></title>
<!--[if IE 6]>
	<script type="text/javascript" src="../Public/js/ie6-png.js"></script>
    <script language="javascript" type="text/javascript">
    	DD_belatedPNG.fix(".sideBar_two img,.li-item1,.li-item2,.li-item3,.li-item4,.li-item5,.main_top img");
    </script>
<![endif]-->
</head>

<body>
	<div class="headlogin">
		<div>
			<?php if($userName == ''): ?><a href="<?php echo ($nav_login); ?>">login</a>&nbsp;&nbsp;&nbsp;<a href="<?php echo ($nav_register); ?>">register</a>
			<?php else: ?>
				<a href="<?php echo ($nav_logout); ?>">logout</a><?php endif; ?>

		</div>
	</div>
   <div id="header">
        <h1 class="logo"><a href="__ROOT__/apps"><img alt="index.php" src="../Public/images/logo.gif" /></a></h1>
       <?php if($userName != ''): ?><div class="top_tips">
            <span class="tips_One">Current c2earn points</span>
            <span class="tips_zero"><?php echo ($userPoints); ?></span>
        </div><?php endif; ?>
        <div class="topBar">
            <span>Seeing Ad, Earning Points
    and Redeem Gift Cards
            </span>
        </div>
        
         <ul class="nav">
         
            <li class="selected li-item1">
                <a href="<?php echo ($nav_index); ?>">
                    <b class="nav_bd_left" <?php if($MODULE_NAME == 'Index'): ?>style="background: url(../Public/images/nav_hover_left.gif);"<?php endif; ?>></b>
                    <span class="nav_middle_bd" <?php if($MODULE_NAME == 'Index'): ?>style="background: url(../Public/images/nav_hover_middle.gif);"<?php endif; ?>><b class="li-item1" >Earn points</b></span>
                    <b class="nav_bd_right" <?php if($MODULE_NAME == 'Index'): ?>style=" background:url(../Public/images/nav_hover_right.gif);"<?php endif; ?>></b>
                </a>         
            </li>
            <li>
                <a href="<?php echo ($nav_coupons); ?>">
                    <b class="nav_bd_left" <?php if($MODULE_NAME == 'Coupon'): ?>style="background: url(../Public/images/nav_hover_left.gif);"<?php endif; ?>></b>
                    <span class="nav_middle_bd setWrap-item2" <?php if($MODULE_NAME == 'Coupon'): ?>style="background: url(../Public/images/nav_hover_middle.gif);"<?php endif; ?>><b class="li-item2">Redeem gift card</b></span>
                    <b class="nav_bd_right" <?php if($MODULE_NAME == 'Coupon'): ?>style=" background:url(../Public/images/nav_hover_right.gif);"<?php endif; ?>></b>
                </a>         
            </li>
            <li class="li-item3">
                <a href="###">
                    <b class="nav_bd_left" <?php if($MODULE_NAME == 'CouponFree'): ?>style="background: url(../Public/images/nav_hover_left.gif);"<?php endif; ?>></b>
                    <span class="nav_middle_bd" <?php if($MODULE_NAME == 'CouponFree'): ?>style="background: url(../Public/images/nav_hover_middle.gif);"<?php endif; ?>><b class="li-item3">Free coupons</b></span>
                    <b class="nav_bd_right" <?php if($MODULE_NAME == 'CouponFree'): ?>style=" background:url(../Public/images/nav_hover_right.gif);"<?php endif; ?>></b>
                </a>         
            </li>
            <li class="li-item4">
                <a href="####">
                    <b class="nav_bd_left" <?php if($MODULE_NAME == 'Help'): ?>style="background: url(../Public/images/nav_hover_left.gif);"<?php endif; ?>></b>
                    <span class="nav_middle_bd" <?php if($MODULE_NAME == 'Help'): ?>style="background: url(../Public/images/nav_hover_middle.gif);"<?php endif; ?>><b class="li-item4">Help</b></span>
                    <b class="nav_bd_right" <?php if($MODULE_NAME == 'Help'): ?>style=" background:url(../Public/images/nav_hover_right.gif);"<?php endif; ?>></b>
                </a>         
            </li>
            <li class="li-item5">
                <a href="####">
                    <b class="nav_bd_left" <?php if($MODULE_NAME == 'Web'): ?>style="background: url(../Public/images/nav_hover_left.gif);"<?php endif; ?>></b>
                    <span class="nav_middle_bd" <?php if($MODULE_NAME == 'Web'): ?>style="background: url(../Public/images/nav_hover_middle.gif);"<?php endif; ?>><b class="li-item5">c2earn website</b></span>
                    <b class="nav_bd_right" <?php if($MODULE_NAME == 'Web'): ?>style=" background:url(../Public/images/nav_hover_right.gif);"<?php endif; ?>></b>
                </a>         
            </li>
          </ul><!-- end:nav -->
    </div><!-- end:header -->

    <div id="content">
    	<div class="main_top">
        	<h2><span class="textShadow">Today you have:</span><span class="Hello-item textShadow">Hello <?php echo ($userName); ?></span></h2>
            <h3 class="sideBar_two">
				<img src="../Public/images/tag_1.png" alt="##" /><span>Ads to see</span> <span style="position:absolute;color:#666; font-size:23px; margin:25px 0px 0px -109px;_margin:25px 0px 0px -104px;"><?php echo ($video_count); ?></span>
            </h3>
            <span class="tag_test textShadow">
            	Please see today's ad to earn more points.<br />Your favourable gift cards are waiting for your redemption!
            </span>  
            <div class="bd_bottom"></div>      
        </div><!-- end:main_top -->
        
        <div class="main_bottom">
        	<div class="main_bottom_bf">
                <div class="main-Sidebar">
                    <div class="top-Sidebar">
                       <label>Advertising</label>                 
                    </div>
                    
                    <div class="middle-Sidebar">
					
							<form action="__ACTION__" method="post" class="gift-form2" name="cat_form">
							   <select class="select2" name="video_cat" onchange="document.cat_form.submit();">
									<option value="" <?php if($catId == 0): ?>selected<?php endif; ?> >All</option>
									<?php if(is_array($video_cats)): foreach($video_cats as $key=>$cat): ?><option value="<?php echo ($cat["cat_id"]); ?>" <?php if($catId == $cat['cat_id']): ?>selected<?php endif; ?> ><?php echo ($cat["cat_name"]); ?></option><?php endforeach; endif; ?>
									
								</select>
							 </form>
							 
                 		<ul class="main-listItem">
                        
                        	<?php if(is_array($videos)): foreach($videos as $key=>$video): ?><li>
                            	<div class="li-setWra">
                                    <a href="<?php echo ($video["url"]); ?>">
										<?php if($video["image_name"] == ''): ?><img src="__ROOT__/Public/Uploads/no-image.gif" width="82px" height="73px" /></a>
										<?php else: ?>
											<img src="__ROOT__<?php echo ($video["image_path"]); ?><?php echo ($video["image_name"]); ?>" width="82px" height="73px" /></a><?php endif; ?>
										
                                    <div class="pWrap">
                                        <p class="font-11"><?php echo ($video["video_name"]); ?></p>
                                        <p class="font-11"><?php echo ($video["video_name"]); ?></p>
                                        <p class="font-12"><?php echo ($video["point"]); ?> points</p>
                                    </div>	
                                </div>
                            </li><?php endforeach; endif; ?>
                                    
                        </ul>
						 <div class="page_records"><?php echo ($page); ?></div>
                    </div>
					
                    
                    <div class="foot-Sidebar">
                    	<span>See good returns!&nbsp;</span>
                    </div>
               </div>
           </div>
        </div><!-- end:main_bottom -->
      
          
        <div class="main_bottom_3">
        
        </div><!-- end:main_bottom_2 -->
    </div><!-- end:content-->

    <div id="footer">
  
        <ul class="footer_nav">
            <li><a href="###">Users Agreement</a></li> |
            <li><a href="###">Privacy Policy</a></li> |
            <li><a href="###"> Contact  Us</a></li>
        </ul>
        <p>Copyright © 2011 c2earn Multimedia.  All rights reserved. </p>
    </div><!-- end:footer-->
    
</body>
<script type="text/javascript" src="../Public/js/jquery-1.3.min.js"></script>
<script type="text/javascript" src="../Public/js/nav-hover.js"></script>

</html>